package com.meishu.sdkdemo.adactivity.taskcenter;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;

import com.meishu.sdk.core.webview.TaskCenterWebActivity;
import com.meishu.sdkdemo.R;

public class TaskCenterDemoActivity extends AppCompatActivity {

    private EditText urlET;
    private EditText userIdET;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_task_center_demo);

        urlET = findViewById(R.id.et_task_url);
        userIdET = findViewById(R.id.et_task_userId);
        String url = "http://192.168.2.39:8080/?mid=101886&uid=__UID__&dev=__DEVICE__";
        urlET.setText(url);
        findViewById(R.id.task_center_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                jumpTaskCenter();
            }
        });
    }

    private void jumpTaskCenter() {
        TaskCenterWebActivity.startSelf(this,urlET.getText().toString().trim(),userIdET.getText().toString().trim());
    }
}